package zhtt.scheduler;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import zhtt.entity.Expression;
import zhtt.service.SyncDataService;

/**
 * Created by zhtt on 2016/10/28.
 */
public class ZhttJob implements Job {

    @Override
    public void execute(JobExecutionContext jobCtx) throws JobExecutionException {
        JobDataMap jdm=jobCtx.getMergedJobDataMap();
        SyncDataService syncDataService=(SyncDataService) jdm.get("syncDataService");
        Expression expression=(Expression) jdm.get("expression");
        syncDataService.sync(expression);
    }
}
